import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import NewHouse from '@/components/NewHouse'
import DanTi from '@/components/DanTi'
import DanTiDetail from '@/components/DanTiDetail'
import SecondarySource from '@/components/SecondarySource'
import NewHouseDetail from '@/components/NewHouseDetail'
import SecondarySourceDetail from '@/components/SecondarySourceDetail'
import News from '@/components/News'
import NewsDetail from '@/components/News/Detail.vue'
import About from '@/components/About/index.vue'
import Search from '@/components/Search/index.vue'
import Help from '@/components/Help/index.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/danti',
      name: 'danTi',
      component: DanTi
    },
    {
      path: '/Help',
      name: 'Help',
      component: Help
    },
    {
      path: '/danti-detail/:id',
      name: 'danTiDetail',
      component: DanTiDetail
    },
    {
      path: '/new-house',
      name: 'newHouse',
      component: NewHouse
    },
    {
      path: '/new-house/detail/:id',
      name: 'newHouseDetail',
      component: NewHouseDetail
    },
    {
      path: '/secondary-source',
      name: 'SecondarySource',
      component: SecondarySource
    },
    {
      path: '/search/:content/:tab',
      name: 'Search',
      component: Search
    },
    {
      path: '/secondary-source/detail/:id',
      name: 'SecondarySourceDetail',
      component: SecondarySourceDetail
    },
    {
      path: '/news',
      name: 'news',
      component: News
    },
    {
      path: '/news-detail/:id',
      name: 'newsDetail',
      component: NewsDetail
    },
    {
      path: '/about',
      name: 'about',
      component: About
    }
  ]
})
